﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Line : MonoBehaviour
{

    public Transform line;
    public Transform endPoint;
    public Color menuColor, terrainColor, interactableObjColor, normalColor;
    // Use this for initialization
    void Start()
    {
    }

    // Update is called once per frame
    void Update()
    {

    }

    public void SetLinePos(Vector3 startPos, Vector3 endPos)
    {
        endPoint.position = endPos;

        Vector3 localScale = line.localScale;
        localScale.y = Vector3.Distance(startPos, endPos) * .5f;
        line.localScale = localScale;
        Vector3 pos = (startPos + endPos) * 0.5f;
        line.position = pos;
        line.up = (endPos - startPos).normalized;
    }

    public void ChangeLineColor()
    {
        Color c = Color.red;
    }

    public void ShowHideLine(bool b)
    {
    }

}
